From e4f818575153c0c01ac96b7ea9add87bbaff0b76 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Fri, 3 Jan 2003 20:16:11 +0000 Subject: [PATCH] (sort-coding-systems): Adjust priority of utf-16 and x-ctext. --- lisp/international/mule-cmds.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index d5b7663c5f9..c70fa7a43a5 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -425,9 +425,18 @@ non-nil, it is used to sort CODINGS in the different way than above." (let ((base (coding-system-base x))) (+ (if (eq base most-preferred) 64 0) (let ((mime (coding-system-get base 'mime-charset))) + ;; Prefer coding systems corresponding to a + ;; MIME charset. (if mime - (if (string-match "^x-" (symbol-name mime)) - 16 32) + ;; Lower utf-16 priority so that we + ;; normally prefer utf-8 to it, and put + ;; x-ctext below that. + (cond ((or (eq base 'mule-utf-16-le) + (eq base 'mule-utf-16-be)) + 16) + ((string-match "^x-" (symbol-name mime)) + 8) + (t 32)) 0)) (if (memq base lang-preferred) 8 0) (if (string-match "-with-esc$" (symbol-name base)) -- 2.30.2